namespace NielsRask.K242.Core
{
	public interface IPlayer	// vi bruger den ikke ..
	{
		Colony Colony	// senere et array/list
		{
			get;
		}
	}

	public class HumanPlayer : IPlayer
	{
		private Colony colony = null;

		public Colony Colony
		{
			get { return colony; }
		}

		public void Occupy( Asteroid asteroid )
		{
			asteroid.BuildColony(null);
			colony = asteroid.Colony;
		}
	}

	public class AIPlayer : IPlayer
	{
		private Colony colony = null;
		private IGovernor governor;

		public Colony Colony
		{
			get { return colony; }
		}
		public IGovernor Governor
		{
			get { return governor; }
		}

		public void Update()	// kaldes af timer
		{
			Governor.Update();
		}

		public Colony Occupy( Asteroid asteroid )
		{
			asteroid.BuildColony(null);
			colony = asteroid.Colony;
			this.governor = new Governor2( colony, null );
            colony.Governor = this.Governor;
			return asteroid.Colony;
		}
	}
}
